package blogger.client.model.entity;

import java.util.Date;

import com.google.gwt.user.client.rpc.IsSerializable;

public class Message implements IsSerializable{
	private long id;

	private long user_id;
	
	private String text;
	
	private Date date;

    public Message(long id, long user_id, String text, Date date) {
        this.id = id;
        this.user_id = user_id;
        this.text = text;
        this.date = date;
    }

    public Message(String text) {
        this.text = text;
    }

    public void setDate(Date date) {
		this.date = date;
	}

	public Date getDate() {
		return date;
	}

	public void setText(String text) {
		this.text = text;
	}

	public String getText() {
		return text;
	}

	public void setUser_id(long user_id) {
		this.user_id = user_id;
	}

	public long getUser_id() {
		return user_id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public long getId() {
		return id;
	}
	@Override
	public String toString() {

		return user_id + " " + text;
	}
	public Message(long userId, String text, Date date) {
		super();
		user_id = userId;
		this.text = text;
		this.date = date;
	}

	public Message() {
		super();
		// TODO Auto-generated constructor stub
	}
	

}
